<?php

namespace app\airobot\controller;

use app\airobot\FundConst;
use app\airobot\model\UserModel;
use think\admin\Controller;

/**
 * 超管系统-轨迹管理2
 * Class BuriedPointManager
 * @package app\airobot\controller
 */
class BuriedPointManager extends Controller
{
    private $table = 'buried_point';

    /**
     * 轨迹管理2
     * @auth true
     */
    public function index()
    {
        $this->title = '轨迹管理';
        $query = $this->_query($this->table);
        $query->like('user_id,action,page_name,button_name');
        $query->where([]);
        $query->order('id desc')->page();
    }

    /**
     * 列表数据处理
     * @auth true
     * @param array $data
     * @throws \Exception
     */
    protected function _index_page_filter(array &$data)
    {
        /*$userIds = array_column($data, 'user_id');
        $userModel = new UserModel();
        $userList = $userModel->queryList([], ['field' => 'id', 'data' => $userIds], [], [], [], "", $field = "*", $order = "");
        $userMap = array_column($userList, null, 'id');

        $platformMap = [0 => "未知", 1 => "未知", 2 => "币安", 3 => "欧易"];
        foreach ($data as &$vo) {
            $vo['platform_name'] = $platformMap[$vo['platform_type']];
            $vo['username'] = isset($userMap[$vo['user_id']]) ? $userMap[$vo['user_id']]['username'] : '';
        }*/
    }
}